package com.jservice.web.smkAppUser;

import com.jservice.framework.dto.Order;
import com.jservice.framework.dto.Pageable;
import com.jservice.framework.dto.Pager;
import com.jservice.framework.spring.SpringContextUtil;
import com.jservice.model.SmkAppUser;
import com.jservice.web.base.JBaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * SmkAppUserService
 *
 * @author cwvian
 * @version 1.0
 * @date 2017/7/12
 */
@Service("smkAppUserQuery")
@Transactional(readOnly = true)
public class SmkAppUserService extends JBaseService {

	public static final SmkAppUser DAO = new SmkAppUser();

	public static SmkAppUserService me() {
		return SpringContextUtil.getBean("smkAppUserQuery");
	}

	public Pager findPage(Pageable pageable) {
		Order order1 = new Order();
		order1.setProperty("login_date");
		order1.setDirection(Order.Direction.desc);

		pageable.getOrders().add(order1);
		return findPage(pageable,DAO, SmkAppUser.TABLE_NAME);
	}

}
